//
//  IndexProjectCell.m
//  lcf-newproject
//
//  Created by yangyang on 14-11-20.
//  Copyright (c) 2014年 yang. All rights reserved.
//

#import "IndexProjectCell.h"
#import "CustomProgressView.h"

@interface IndexProjectCell ()

@property (nonatomic,strong)CustomProgressView * progressView;

@end

@implementation IndexProjectCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

//创建progressView
-(void)createProgressView:(CGFloat)progress{
    if (_progressView) {
        [_progressView removeFromSuperview];
    }
    _progressView = [[CustomProgressView alloc]initWithFrame:CGRectMake(0, 0, _degressWidth, _degressHeight)];
    
    CGFloat radius = _degressWidth/2;
    [_progressView setProgressLayerWithProgressColor:_degressProgressColor withRadius:radius withLineWidth:2 withStartAngle:_degressStartAngle withEndAngle:_degressEndAngle withStokeEnd:progress];
    [_progressView setTrackLayerWithTrackColor:_degressTrackColor withRadius:radius withStrokeLineWidth:1 withProgressLineWidth:2 withStartAngle:_degressStartAngle withEndAngle:_degressEndAngle];
    [_progressView addCenterView:(int)(progress*100)];
    //[progressView startProgressLayerAnimation:progress];
    [self.tradeProgressView addSubview:_progressView];
}


@end
